<?php
namespace app\controller;

class Base
{

    public function __construct()
    {
        
    }

    public function create($data, $msg=[], $code=200)
    {
        $data = [
            'code' => $code,
            'msg'  => $msg,
            'data' => $data,
        ];

        header('Content-Type:application/json; charset=utf-8');
        exit(json_encode($data));
    }
}